local channelSpecial = channelSpecial or {}

channelSpecial.CMjd = {}

local _CMjd = channelSpecial.CMjd

function _CMjd:exitGame()
	-- body
	local luaj = require "luaj"

    local args = {}
    local sigs = "()V"
    local className = "org/cocos2dx/lua/AppActivity"
    local ok = luaj.callStaticMethod(className, "s_ExitGame_fromLua", args, sigs)
    if not ok then
        error("s_ExitGame_fromLua error", 1)
    end
end

function _CMjd:moreGame()
	-- body
	local luaj = require "luaj"

    local args = {}
    local sigs = "()V"
    local className = "org/cocos2dx/lua/AppActivity"
    local ok = luaj.callStaticMethod(className, "s_MoreGames_fromLua", args, sigs)
    if not ok then
        error("s_MoreGames_fromLua error", 1)
    end
end

---------------------------------------------------------
channelSpecial.XNY = {}

local _XNY = channelSpecial.XNY

function _XNY:getUserId_callJava()
    -- body
    local args = {}
    local sigs = "()V"
    local className = "org/cocos2dx/lua/AppActivity"
    local ok = luaj.callStaticMethod(className, "s_XNY_getUserId_fromLua", args, sigs)

    if not ok then
        d_print("XNY:getUserId_callJava error")
    end
end

function channelSpecial_XNY_returnUserId_fromJava(retStr)
    channelSpecial.XNY.strUserId = retStr
    d_print("XNY: userId="..retStr)
    gameStartCallback()
    d_print("game started")
end

return channelSpecial